/**
 * @author dumeng
 */
import request from '@/utils/request'
/**
 * 获取分类树形列表
 */
export function getClassifyTree(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/learnClassify/getClassifyTree',
    method: 'POST',
    data
  })
}
/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: {
      dictCode
    }
  })
}
/**
 * 列表查询
 */
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/queryPage',
    method: 'POST',
    data
  })
}
/**
 * 新增
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/insert',
    method: 'POST',
    data
  })
}
/**
 * 编辑
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/update',
    method: 'POST',
    data
  })
}
/**
 * 详情
 */
export function get(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/subject/get',
    method: 'POST',
    data
  })
}
/*
* 上传图片
* */
export function upload(data) {
  return request({
    baseURL: '/API-DOCUMENT/',
    url: '/document/file/uploadFile',
    method: 'POST',
    data
  })
}
